<%@include file="/WEB-INF/templates/configuration.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="windows-1252"%>

<h2>${pageTitle}</h2>
<c:if test="${not empty foutMelding}">
    <!-- Mochten er foutmeldingen zijn, dan worden ze hier getoond -->
    <p>${foutMelding}</p>
</c:if>
<c:choose>
    <c:when test="${empty assignment.assignmentid}">
        <!-- Als er geen id is meegegeven, ga je een cursus toevoegen -->
        <form id="nieuweCursus" action="new" method="post">
        </c:when>
        <c:otherwise>
            <!-- Anders ga je een gebruiker wijzigen -->
            <form id="wijzigenCursus" action="edit" method="post">
            </c:otherwise>
        </c:choose>
        <p>
            <c:if test="${not empty assignment.assignmentid}">
                <!-- Het id wordt meegestuurd, om te bepalen welke cursus je gaat wijzigen -->
                <input type="hidden" name="assignmentid" id="assignmentid" value="${assignment.assignmentid}"></input>
            </c:if>
            <input type="hidden" name="chapterid" id="chapterid" value="${chapter.chapterid}"></input>
            <table border="0">
            <tr><td><label for="assignmentname">Assignment Question</label></td></tr>
            <tr><td><input type="textfield" id="assignmentname" name="assignmentname" value="${chapter.chapterName}"></input></td></tr>

            <tr><td><label for="assignmentquestion">Assignment Type</label></td></tr>
            <tr><td><textarea rows="4" cols="50" id="assignmentquestion" class="mceEditor" name="assignmentquestion">${chapter.chapterdescription}</textarea></td></tr>
            
            <tr><td><label for="assignmenttype">Assignment Type</label></td></tr>
            <tr><td>
                    <select>
                        <option value="0">Radio boxen</option>
                        <option value="1">Check boxen</option>
                    </select>
            </td></tr>
        </table>
        </p>
        <p>
            <input class="submit" type="submit" value="${buttonTitle}">
        </p>
    </form>